<table id="user-table" class="table table-striped table-hover" data-search-form="#user-search-form">
  <thead>
    <tr>
      <th>{{'admin.operation_analysis.video.username'|trans}}</th>
      <th>{{ setting('course.task_name')|default('admin.setting_course.task'|trans) }}</th>
      <th>{{'admin.operation_analysis.video.watch_time'|trans}}</th>
      <th>{{'admin.operation_analysis.video.type'|trans}}</th>
    </tr>
  </thead>
  <tbody>
    {% if videoViewedDetail %}
      {% for key,val in videoViewedDetail %}
        {% if  tasks[val.taskId].title|default(null)  %}
          <tr>
            <td>{{ users[val.userId].nickname }}</td>
            <td>{{ tasks[val.taskId].title }}</td>
            <td>{{val.createdTime|date_format}}</td>
            <td>{{dict_text('videoStorageType',val.fileStorage)}}</td>
          </tr>
          {% else %}
          <tr class="danger">
            <td>{{ users[val.userId].nickname }}</td>
            <td>({{'admin.operation_analysis.task.empty'|trans({'%taskName%':setting('course.task_name')|default('admin.setting_course.task'|trans)})}})</td>
            <td>{{val.createdTime|date_format}}</td>
            <td>{{dict_text('videoStorageType',val.fileStorage)}}</td>
          </tr>
        {% endif %}
      {% endfor %}
    {% endif %}
  </tbody>
</table>
{{ admin_macro.paginator(paginator) }}
